package com.study.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.alibaba.druid.pool.xa.DruidXADataSource;

@Configuration
public class DataSourceConfig {

	@Bean(name = "db1Porperty")
	@ConfigurationProperties(prefix = "spring.datasource.db1")
	public DruidXADataSource dataSourceDb1() {
		return new DruidXADataSource();
	}

	@Bean(name = "db2Porperty")
	@ConfigurationProperties(prefix = "spring.datasource.db2")
	public DruidXADataSource dataSourceDb2() {
		return new DruidXADataSource();
	}

	@Bean(name = "db3Porperty")
	@ConfigurationProperties(prefix = "spring.datasource.db3")
	public DruidXADataSource dataSourceDb3() {
		return new DruidXADataSource();
	}
}
